
#ifndef   ___SYSTEM__H__
#define   ___SYSTEM__H__


void Enable_interrupts( void );
void Disable_interrupts( void );
void cpu_restore_sr(int);
int cpu_save_sr(void);

void sysInit( void );

void  cpu_irq_isr(void);
void  cpu_fiq_isr(void);

void WDT_Reload (void );
void WDT_Init( unsigned int Timeout );
void Sys_Reset ( void );

/* #if USE_USB		/\* 1 is USB, 0 is non-USB related *\/   */
/* /\* Fcck = 57.6Mhz, Fosc = 288Mhz, and USB 48Mhz *\/ */
/* #define PLL_MValue			11 */
/* #define PLL_NValue			0 */
/* #define CCLKDivValue			4 */
/* #define USBCLKDivValue		5 */

/* /\* System configuration: Fosc, Fcclk, Fcco, Fpclk must be defined *\/ */
/* /\* PLL input Crystal frequence range 4KHz~20MHz. *\/ */
/* #define Fosc	12000000 */
/* /\* System frequence,should be less than 80MHz. *\/ */
/* #define Fcclk	57600000 */
/* #define Fcco	288000000 */
/* #else */

/* /\* Fcck = 50Mhz, Fosc = 300Mhz, and USB 48Mhz *\/ */
/* #define PLL_MValue			24 */
/* #define PLL_NValue			1 */
/* #define CCLKDivValue			5 */
/* #define USBCLKDivValue		6 */

/* /\* System configuration: Fosc, Fcclk, Fcco, Fpclk must be defined *\/ */
/* /\* PLL input Crystal frequence range 4KHz~20MHz. *\/ */
/* #define Fosc	12000000 */
/* /\* System frequence,should be less than 80MHz. *\/ */
/* #define Fcclk	50000000 */
/* #define Fcco	300000000 */

/* #endif */

/* /\* APB clock frequence , must be 1/2/4 multiples of ( Fcclk/4 ). *\/ */
/* /\* If USB is enabled, the minimum APB must be greater than 16Mhz *\/  */
/* #if USE_USB */
/* #define Fpclk	(Fcclk / 2) */
/* #else */
/* #define Fpclk	(Fcclk / 4) */
/* #endif */

#endif
